#include <stdio.h>
#include "hash.h"

int main(int argc, const char * argv[]){

    hash h = hash_create();
    if (h == NULL)
	return -1;

    int data[] = {23, 34, 14, 38, 46, 16, 68, 15, 7, 31, 26};
    int key;

    for (int i = 0; i < sizeof(data)/sizeof(int); i++) {
		hash_insert(h, data[i]);
	}

    printf("input:");
    scanf("%d", &key);
    linklist p =hash_search(h, key);

    if (p == NULL)
	printf("not found\n");
    else
	printf("found:%d %d\n", key, p->key);

    return 0;
}
